// 放置所有的路由分发配置
const express = require('express');
const router = express.Router();


// 1.添加商品的页面
router.get('/addproduct', require('./product-router/addproduct'));
// 2.配置本地上传富文本图片的接口
router.post('/uploadimg', require('./product-router/uploadimg'));
// doaddproduct
// 3.添加商品
router.post('/doaddproduct', require('./product-router/doaddproduct'));
// 4.展示商品列表页面productlist
router.get('/productlist', require('./product-router/productlist'));
// 5.删除deleteproduct
router.post('/deleteproduct', require('./product-router/deleteproduct'));
// 6.修改editproduct
router.get('/editproduct', require('./product-router/editproduct'));

// 7.修改提交doeditproduct
router.post('/doeditproduct/:productId', require('./product-router/doeditproduct'));
// 8.搜索产品
router.get("/searchproduct", require("./product-router/searchproduct"));

module.exports = router;